package com.sanploy.fed.push.util;

import java.text.SimpleDateFormat;
import java.util.Date;

/**
 * Created by Administrator on 2016/8/1.
 */
public class DateUtil {


    public static Long getCurrentTimestamp(){
        return System.currentTimeMillis();
    }

    public static String getTimeNormal(){
        return getTimeByFormat("yyyy-MM-dd HH:mm:ss");
    }

    public static String getTimeByFormat(String format){
        SimpleDateFormat simpleDateFormat = new SimpleDateFormat(format);
        Date date = new Date();
        return simpleDateFormat.format(date);
    }
}
